import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.List;

public class AA {

	static DecimalFormat numberFormat = new DecimalFormat("#.##########"); // Instance
																	// variable

	// Use: x.getTotalString
	// Post: getTotalString is the final product (end result)
	public static String getTotalString(String total) {
		String formattedValue = numberFormat.format(total);
		formattedValue = formattedValue.replaceAll("^-(?=0(.0*)?$)", "");
		return "" + Double.parseDouble(formattedValue);
		// return "" + Double.parseDouble(numberFormat.format(total));
	}
	
	public static void main(String[] args) {
		List<String> li = Arrays.asList("3,3", "3,0", "3,1");
		for(String s : li)
			System.out.println(getTotalString(s));
	}
}
